#include "grouplist.h"
#include "ui_grouplist.h"

grouplist::grouplist(QString str,QWidget *parent) :
    QDialog(parent),
    ui(new Ui::grouplist)
{
    ui->setupUi(this);
    QStringList list = str.split(",");
    ui->lineEdit1->setText(list[0]);
    ui->lineEdit2->setText(list[1]);
    ui->lineEdit3->setText(list[2]);
    ui->lineEdit4->setText(list[3]);
    ui->lineEdit5->setText(list[4]);
    ui->lineEdit6->setText(list[5]);
    ui->lineEdit7->setText(list[6]);
    ui->lineEdit8->setText(list[7]);
    ui->lineEdit9->setText(list[8]);
    ui->lineEdit10->setText(list[9]);
    ui->lineEdit11->setText(list[10]);
    ui->lineEdit12->setText(list[11]);
    ui->lineEdit13->setText(list[12]);
    ui->lineEdit14->setText(list[13]);
    ui->lineEdit15->setText(list[14]);
    ui->lineEdit16->setText(list[15]);
    ui->lineEdit17->setText(list[16]);
    ui->lineEdit18->setText(list[17]);
    ui->lineEdit19->setText(list[18]);
    ui->lineEdit20->setText(list[19]);
    ui->lineEdit21->setText(list[20]);
    ui->lineEdit22->setText(list[21]);
    ui->lineEdit23->setText(list[22]);
    ui->lineEdit24->setText(list[23]);
    ui->lineEdit25->setText(list[24]);
    ui->lineEdit26->setText(list[25]);
    ui->lineEdit27->setText(list[26]);
    ui->lineEdit28->setText(list[27]);
    ui->lineEdit29->setText(list[28]);
    ui->lineEdit30->setText(list[29]);
    ui->lineEdit31->setText(list[30]);
    ui->lineEdit32->setText(list[31]);



}

grouplist::~grouplist()
{
    delete ui;
}

void grouplist::on_pushButton_clicked()
{
    QString str = ui->lineEdit1->text() + "," + ui->lineEdit2->text() + "," + ui->lineEdit3->text() + "," +
            ui->lineEdit4->text() + "," + ui->lineEdit5->text() + "," + ui->lineEdit6->text() + "," +
            ui->lineEdit7->text() + "," + ui->lineEdit8->text() + "," + ui->lineEdit9->text() + "," +
            ui->lineEdit10->text() + "," + ui->lineEdit11->text() + "," + ui->lineEdit12->text() + "," +
            ui->lineEdit13->text() + "," + ui->lineEdit14->text() + "," + ui->lineEdit15->text() + "," +
            ui->lineEdit16->text() + "," + ui->lineEdit17->text() + "," + ui->lineEdit18->text() + "," +
            ui->lineEdit19->text() + "," + ui->lineEdit20->text() + "," + ui->lineEdit21->text() + "," +
            ui->lineEdit22->text() + "," + ui->lineEdit23->text() + "," + ui->lineEdit24->text() + "," +
            ui->lineEdit25->text() + "," + ui->lineEdit26->text() + "," + ui->lineEdit27->text() + "," +
            ui->lineEdit28->text() + "," + ui->lineEdit29->text() + "," + ui->lineEdit30->text() + "," +
            ui->lineEdit31->text() + "," + ui->lineEdit32->text();

    emit send_str(str);
    this->close();
}







